package ovm.gui.actions.menu.employee;

import com.vaadin.ui.MenuBar;
import ovm.entity.EmployeeEntity;
import ovm.gui.actions.menu.AbstractMenuAction;
import ovm.gui.views.AbstractEntityListView;
import ovm.gui.views.EntityListViewFactory;
import ovm.gui.views.employee.EmployeeListView;

import static ovm.application.MainApplication.*;

public class EmployeeListAction extends AbstractMenuAction {

    @Override
    public void menuSelected(MenuBar.MenuItem selectedItem) {
        AbstractEntityListView view = EntityListViewFactory.createEntityListView(EmployeeEntity.class, true);
        navigator.setMainView(view);
    }
}
